package com.frostmourne.mxsguimaker.commands;

import com.gitee.mxstarsex.objects.builders.bukkit.commands.CommandBuilder;
import com.gitee.mxstarsex.objects.builders.bukkit.commands.CommandElement;
import com.gitee.mxstarsex.objects.builders.bukkit.commands.annotations.MainCommand;
import org.bukkit.plugin.java.JavaPlugin;

@MainCommand(name = "mxs-gui-maker",alias = {"mxsgm","gui-maker","g-m"})
public class CommandHandler extends CommandBuilder {
    public CommandHandler(JavaPlugin javaPlugin) {
        super(javaPlugin);
    }

    @Override
    public void run(CommandElement commandElement) {

        boolean isOp = commandElement.getSender().isOp();

        commandElement.sendMessage("&8[&6&l!&8]&f/" + commandElement.getDispatchCommand() + " open <背包名称> <玩家名称> &6为玩家打开背包");
        if (isOp){
            commandElement.sendMessage("&8[&6&l!&8]&f/" + commandElement.getDispatchCommand() + " force-open <背包名称> <玩家名称> &6强制打开玩家的背包(需在线)");
            commandElement.sendMessage("&8[&6&l!&8]&f/" + commandElement.getDispatchCommand() + " reload &6重载插件配置");
        }

    }
}
